import { createRouter, createWebHashHistory } from 'vue-router'
import { constantRoutes } from './routes'
//暴露对外的静态路由
const constantRouter = createRouter({
  //我们采用带#号的哈希模式 createWebHistory()
  history: createWebHashHistory(),
  //给路由添加滚动效果
  scrollBehavior() {
    return { left: 0, top: 0 }
  },
  routes: constantRoutes
})

export default constantRouter
